

/**
 * Created by gl on 2017/4/15.
 */
public class CaiShu {
    public static void main(String[] args){
        java.util.Scanner sc=new java.util.Scanner(System.in);
        System.out.println("猜猜数：");
        int i=sc.nextInt();
        int num =(int)(Math.random()*100+1);
        int count=0;
        while(true) {
            count++;
            if (num > i) {
                System.out.println("猜小了");
                i=sc.nextInt();
            } else if (num < i) {
                System.out.println("猜大了");
                i=sc.nextInt();
            } else {
                System.out.println("恭喜你，猜对了！");
                break;
            }

        }
        System.out.println("猜了多少次："+count);
        if(count<4){
            System.out.println("好棒啊！你真聪明！");
        }else{
            System.out.println("你真笨！猜这么多次都没猜对！");
        }
    }
}
